package com.springup.trade.entity;

import lombok.Data;


@Data
public class Result<T> {
    private  int code = 200;
    private String message = "success";
    private T data;

    public static Result SUCCESS(Object data) {
        Result result = new Result();
        result.setData(data);
        return result;
    }

    public static Result FAILURE(int code, String message){
        Result result = new Result();
        result.setCode(code);
        result.setMessage(message);
        return result;
    }
}
